<?php
include '../utils/Database.php';
include '../model/User.php';
include '../dao/dao.php';
include '../dao/UserDao.php';

$user = new User();

$user->setEmail($_POST["email"]);
$user->setPass(($_POST["password"]));

$userDao= new  UserDao();

$result = $userDao->query($user);

if($result){
	session_start();
	$_SESSION["email"] = $user->getEmail();
	$_SESSION["password"] = $user->getPass();
	
	echo "Fala Matias";
} else {
	echo "Nao vai subir ninguem";
}

?>